<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<c:forEach items="${pager.rows}" var="record" varStatus="in">
    <tr class="${in.index%2==0?"gradeX":"even gradeC"}">
        <td>${record.medicalName}</td>
        <td>${record.medicalOriginPrice}</td>
        <td>${record.medicalUnit}</td>
        <td>${record.medicalSalePrice}</td>
        <td>
            <input type="hidden" class="medical_uuid" value="${record.uuid}" />
            <input type="number" class="am-radius medicalPrice" value="${record.medicalSalePrice}" style="color:black;width: 100px;"></td>
        <td>
            <input type="text" class="am-radius remark" value="${record.reamerk}" style="color:black;width: 100px;"></td>
        <td>
            <div class="tpl-table-black-operation">
                <a href="javascript:;">
                    <i class="am-icon-pencil"></i> 编辑
                </a>
                <a href="javascript:;" class="tpl-table-black-operation-del" onclick="deleteData(${record.uuid});">
                    <i class="am-icon-trash"></i> 删除
                </a>
            </div>
        </td>
    </tr>
</c:forEach>
<script>
    $("#div-pager").html("${pager.bootstrapPager}");
    $(".medicalPrice").each(function(i){
        priceList[i]=this.value;
    });
    $(".remark").each(function(i){
        remarkList[i]=this.value;
    });

    function goPage(page){

        if(isChanged){  // 验证是否更新内容
            theChanged();
        }else {
            pageNo = page;
            tableData(page);
        }
    }

</script>